// 导入joi
const joi = require('joi');

// 定义stu_id的验证规则
const stu_id = joi.string().pattern(/^[0-9]{6}$/).required();

// 定义学生姓名验证规则
const stu_name = joi.string().required();

// 定义性别的验证规则
const sex = joi.number().integer().required();

// 定义class_id的验证规则
const class_id = joi.number().integer().required();

// 向外导出验证规则
exports.add_stuinfo_schema = {
    stu_id,
    stu_name,
    sex,
    class_id
}